﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};

	var auditData = Jxstar.findComboData('audit');
	var mgnstatusData = Jxstar.findComboData('mgnstatus');
	var providertypeData = Jxstar.findComboData('providertype');

	var cols = [
	{col:{header:'记录状态', width:85, sortable:true, hidden:true, align:'center',
		renderer:function(value){
			for (var i = 0; i < auditData.length; i++) {
				if (auditData[i][0] == value)
					return auditData[i][1];
			}
		}}, field:{name:'provider__auditing',type:'string'}},
	{col:{header:'供应商编号', width:100, sortable:true}, field:{name:'provider__provider_code',type:'string'}},
	{col:{header:'供应商名称', width:176, sortable:true}, field:{name:'provider__provider_name',type:'string'}},
	{col:{header:'管理状态', width:100, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: mgnstatusData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: mgnstatusData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < mgnstatusData.length; i++) {
				if (mgnstatusData[i][0] == value)
					return mgnstatusData[i][1];
			}
		}}, field:{name:'provider__manage_status',type:'string'}},
	{col:{header:'供应商类型', width:100, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: providertypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: providertypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < providertypeData.length; i++) {
				if (providertypeData[i][0] == value)
					return providertypeData[i][1];
			}
		}}, field:{name:'provider__provider_type',type:'string'}},
	{col:{header:'执照注册号', width:100, sortable:true}, field:{name:'provider__license_reg',type:'string'}},
	{col:{header:'年营业额(万元)', width:100, sortable:true, renderer:JxUtil.formatNumber(2)}, field:{name:'provider__year_turnover',type:'float'}},
	{col:{header:'电话号码', width:100, sortable:true}, field:{name:'provider__provider_phone',type:'string'}},
	{col:{header:'传真号码', width:100, sortable:true}, field:{name:'provider__faxnumber',type:'string'}},
	{col:{header:'开户行及帐号', width:100, sortable:true, hidden:true}, field:{name:'provider__bank_account',type:'string'}},
	{col:{header:'税号', width:100, sortable:true, hidden:true}, field:{name:'provider__hs_codes',type:'string'}},
	{col:{header:'详细地址', width:100, sortable:true, hidden:true}, field:{name:'provider__address',type:'string'}},
	{col:{header:'邮政编码', width:100, sortable:true, hidden:true}, field:{name:'provider__post_code',type:'string'}},
	{col:{header:'注册资金(万元)', width:100, sortable:true, renderer:JxUtil.formatNumber(2)}, field:{name:'provider__reg_money',type:'float'}},
	{col:{header:'员工人数', width:100, sortable:true, hidden:true}, field:{name:'provider__person_num',type:'string'}},
	{col:{header:'技术人员人数', width:100, sortable:true, hidden:true}, field:{name:'provider__tech_num',type:'string'}},
	{col:{header:'供货类别', width:100, sortable:true}, field:{name:'provider__supply_type',type:'string'}},
	{col:{header:'资金承受能力', width:100, sortable:true, hidden:true}, field:{name:'provider__money_ability',type:'string'}},
	{col:{header:'经营性质', width:100, sortable:true}, field:{name:'provider__naturebus',type:'string'}},
	{col:{header:'法人代表', width:100, sortable:true}, field:{name:'provider__legal_person',type:'string'}},
	{col:{header:'法人代表电话', width:100, sortable:true}, field:{name:'provider__legal_phone',type:'string'}},
	{col:{header:'业务代表', width:100, sortable:true}, field:{name:'provider__business_rep',type:'string'}},
	{col:{header:'业务代表电话', width:100, sortable:true}, field:{name:'provider__rep_phone',type:'string'}},
	{col:{header:'登记人', width:69, sortable:true}, field:{name:'provider__record_user',type:'string'}},
	{col:{header:'登记日期', width:100, sortable:true, renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'provider__record_date',type:'date'}},
	{col:{header:'会员证', width:100, sortable:true, hidden:true}, field:{name:'provider__menber_card',type:'string'}},
	{col:{header:'会员证号', width:100, sortable:true, hidden:true}, field:{name:'provider__mcard_code',type:'string'}},
	{col:{header:'企业概况', width:100, sortable:true, hidden:true}, field:{name:'provider__company_profile',type:'string'}},
	{col:{header:'经营范围', width:100, sortable:true, hidden:true}, field:{name:'provider__run_range',type:'string'}},
	{col:{header:'经营状况', width:100, sortable:true, hidden:true}, field:{name:'provider__run_profile',type:'string'}},
	{col:{header:'企业主要设备状况', width:100, sortable:true, hidden:true}, field:{name:'provider__dev_profile',type:'string'}},
	{col:{header:'质量承诺', width:100, sortable:true, hidden:true}, field:{name:'provider__zlcl',type:'string'}},
	{col:{header:'备注', width:100, sortable:true, hidden:true}, field:{name:'provider__remarks',type:'string'}},
	{col:{header:'主键', width:100, sortable:true, hidden:true}, field:{name:'provider__provider_id',type:'string'}},
	{col:{header:'登记人id', width:100, sortable:true, hidden:true}, field:{name:'provider__record_id',type:'string'}},
	{col:{header:'登记部门', width:100, sortable:true, hidden:true}, field:{name:'provider__dept_name',type:'string'}},
	{col:{header:'登记部门ID', width:100, sortable:true, hidden:true}, field:{name:'provider__dept_id',type:'string'}},
	{col:{header:'供应商简称', width:100, sortable:true, hidden:true}, field:{name:'provider__provider_simple',type:'string'}}
	];
	
	config.param = {
		cols: cols,
		sorts: null,
		hasQuery: '1',
		isedit: '0',
		isshow: '1',
		funid: 'provider_query'
	};
	
	
		
	return new Jxstar.GridNode(config);
}